<div class="ibox">
 <div class="ibox-content">	
	<form id="input" class="form-horizontal" method="post" action="${cxt!}/admin/developer/add" >
		<!--上传头像-->
		<div class="form-group">
			<div class="col-md-6 control-label" id="uploadprofileimgDiv">
				<%#ajax uploadprofileimg:{%>
					<input type="hidden" name="profile" value="${uploadFile.path!}"/>
					<a href="javascript:;">
						<%if(isEmpty(uploadFile!)){%>
						<img src="${cxt!}/img/tupian.jpg"/>
						<%}else{%>
						<img src="${imgCxt!}/${uploadFile.path!}" width="144" height="144" >
						<%}%>
					</a>
				<%}%>
			</div>
			<a href="javascript:;" class="sign_ji" style="margin:0;" id="uploadprofileimg">
				<img src="${cxt!}/img/xiangji.jpg" alt="${_res['system.upload']}" />
			</a>
			<input type="file" style="opacity:0"   id="fileuploadprofileimg" name="profileimg">
		</div>
		
	  <div class="row">
		<!--用户名-->
		<div class="col-md-5">
			<div class="form-group">
				<label for="userid" class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.username"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="username"  placeholder="${_res['developer.username']}" name="customerAdd.username" required aria-required="true" data-rule-minlength="6" data-msg-minlength="${_res['developer.username.length']}">
				</div>
			</div>
		</div>
		
		<!--密码-->
		<div class="col-md-5">
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.password"]}</label>
				<div class="col-md-8">
					<input type="password" class="form-control" id="password" placeholder="${_res['developer.password']}" name="password" required aria-required="true" data-rule-minlength="8" data-msg-minlength="${_res['developer.password.length']}">
		         </div>
			</div>
		</div>
	  </div>	
	
	  <div class="row">
	    <div class="col-md-5">
			<!-- 开发商名称-->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.developerName"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="deveoperName" placeholder="${_res['developer.developerName']}" name="developerAdd.companyname" required aria-required="true">
		         </div>
			</div>
		</div>
		
		<div class="col-md-5">
			<!-- CEO名字 -->
			<div class="form-group">
				<label class="col-md-4 control-label">${_res["developer.CEOName"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="CEOName" placeholder="${_res['developer.CEOName']}" name="developerAdd.ceoname">
		         </div>
			</div>
		</div>
	  </div>
	  
	  <div class="row">
	    <div class="col-md-5">
			<!-- (总部)地址-->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.address"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="address" name="customerAddressAdd.address1" required aria-required="true">
		         </div>
			</div>
		</div>
	  </div>
		
	  <div class="row">
	    <div class="col-md-5">
			<!-- 城市/区 -->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.city"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="address" name="customerAddressAdd.city" required aria-required="true">
		         </div>
			</div>
		</div>
		
		<div class="col-md-5">
			<!-- 州/省 -->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.state"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="address" name="customerAddressAdd.state" required aria-required="true">
		         </div>
			</div>
		</div>
	  </div>
	  
	  <div class="row">
		<div class="col-md-5">
			<!-- 国际码-->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.internationcode"]}</label>
				<div class="col-md-8">
					<#dict type="select" readonly="readonly" class="form-control" name="customerAdd.internationalcode" dictCode="INTERNATIONAL_CODE" required="true"/>
		         </div>
			</div>
		</div>
		
		<!-- 国家 -->
		<div class="col-md-5">
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.country"]}</label>
				<div class="col-md-8">
					<#dict type="select" ordercolumn="nameen" class="form-control" name="customerAddressAdd.country" table="country_region" filedName="name" filedValue="id" required="true"/>
		         </div>
			</div>
		</div>
	  </div>
	  
	  <div class="row">
	    <div class="col-md-5">
			<!--注册人手机号码-->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.phone"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control"  id="telephone" placeholder="${_res['developer.phone']}" name="customerAdd.telephone" data-rule-required="true"  data-rule-number="true" >
		         </div>
			</div>
		</div>
		
		<div class="col-md-5">
			<!-- email-->
			<div class="form-group">
				<label class="col-md-4 control-label">${_res["developer.emailaddress"]}</label>
				<div class="col-md-8">
					<input type="text" data-rule-email="true" data-msg-email="${_res['developer.email']}" class="form-control" id="customerAdd.email" placeholder="${_res['customer.email']}" name="customerAdd.email" >
		         </div>
			</div>
		</div>
	  </div>
		
	  <div class="row">
	    <div class="col-md-5">
			<!-- 公司电话 -->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.companyTel"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="telephone" placeholder="${_res['developer.companyTel']}" name="developerAdd.telephone" required aria-required="true" data-rule-number="true">
		         </div>
			</div>
		</div>
		
		<div class="col-md-5">
			<!-- 公司传真 -->
			<div class="form-group">
				<label class="col-md-4 control-label">${_res["developer.fax"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="telephone" placeholder="${_res['developer.fax']}" name="developerAdd.fax" data-rule-number="true">
		         </div>
			</div>
		</div>
	  </div>
		
	  <div class="row">
	    <div class="col-md-5">
			<!-- ABN -->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.abn"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="telephone" placeholder="${_res['developer.abn']}" name="developerAdd.abn" required aria-required="true" data-rule-number="true">
		         </div>
			</div>
		</div>
		
		<div class="col-md-5">
			<!-- ACN -->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.acn"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="telephone" placeholder="${_res['developer.acn']}" name="developerAdd.acn" required aria-required="true" data-rule-number="true">
		         </div>
			</div>
		</div>
	  </div>
		
	  <div class="row">
	    <div class="col-md-5">
			<!-- 联系人姓名-->
			<div class="form-group">
				<label class="col-md-4 control-label">${_res["developer.contactPersonName"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="linkname" placeholder="${_res['developer.contactPersonName']}" name="developerAdd.contactpersonname">
		         </div>
			</div>
		</div>
		
		<div class="col-md-5">
			<!-- 网址-->
			<div class="form-group">
				<label class="col-md-4 control-label">${_res["developer.website"]}</label>
				<div class="col-md-8">
					<input type="text" data-rule-url="true" data-msg-url="${_res['developer.site']}" class="form-control" id="site" placeholder="${_res['developer.website']}" name="developerAdd.website">
		         </div>
			</div>
		</div>
	  </div>
		
	  <div class="row">
	    <div class="col-md-5">
			<!-- 公司创建时间 -->
			<div class="form-group">
				<label class="col-md-4 control-label">${_res["developer.founddate"]}</label>
				<div class="col-md-8">
					<input type="text" style="max-width: 420px;" class="laydate-icon form-control layer-date" onclick="laydate()" id="companycreatetime" placeholder="${_res['developer.founddate']}" name="developerAdd.founddate">
		         </div>
			</div>
		</div>
		
		<div class="col-md-5">
			<!-- 员工数 -->
			<div class="form-group">
				<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.employees"]}</label>
				<div class="col-md-8">
					<input type="text" class="form-control" id="employees" placeholder="${_res['developer.employees']}" name="developerAdd.employees" required aria-required="true" data-rule-number="true" >
		         </div>
			</div>
		</div>
	  </div>
	  <div class="row">
		  <!-- 公司操作区域 -->
		  <div class="col-md-10">
		    <div class="form-group">
	         <label class="col-md-2 control-label"><span class="fontColorRed">*</span>${_res["developer.operationarea"]}</label>
	          <div class="col-md-10">
	            <#dict  type="checkbox"  name="operationarea" id="operationarea" needIndex="false" dictCode="AUSTRALIA_STATE" required="true" />
	          </div>
	         </div>
		  </div>
	 </div>
	  <!-- 公司简介 -->
	  <div class="row">
	      <div class="col-md-10">
		   <div class="form-group">
			<label class="col-md-2 control-label"><span class="fontColorRed">*</span>${_res["developer.companyprofile"]}</label>
			<div class="col-md-10">
				<textarea rows="6"  cols="98" style="width:100%" name="developerAdd.companyprofile" required aria-required="true"></textarea>
	         </div>
		   </div>
		  </div>
	  </div>
	  <div class="row">
		<div class="form-group">
	       <div class="col-md-4 col-md-offset-2 control-label">
	       		<% if(hasPrivilegeUrl("developerList")){ %>
	         	<button type="button" class="btn btn-warning" onClick="ajaxContent('/admin/developer/list')">${_res["system.return"]}</button>
	         	<%}%>
	         	<button type="submit" class="btn btn-primary">${_res["system.save"]}</button>
	       </div>
       </div>
       </div>
	</form>
  </div>
</div>
<#submit  formId="input"  divId="content" />


<script type="text/javascript">
$(document).ready(function(){
	
	$("a[id^='upload']").on('click', function() {
		var id = $(this).attr("id");
		$("#file" + id).click();
	});
	// 选择文件之后执行上传
	$("input[id^='fileupload']").on('change', function() {
		var fileElementId = $(this).attr("id");
		ajaxFileUpload2("uploadprofileimgDiv",fileElementId,"/realty/customer/developer/addDeveloper.html#uploadprofileimg","developer","uploadFile");
	});

});

</script>
